package strangeattractor.core;

import java.awt.Point;

public class PrimitiveProjector implements Viewpoint {
	//The primitive projector simply ignores the z-axis.

	private int width, height;
	private double zoom;
	
	
	
	@Override
	public Point getCoords(DPoint p) {
		return new Point((int)(width/2 + zoom*p.x), (int)(height/2 + zoom*p.y));
	}

	@Override
	public double getZ(DPoint p) {
		return p.z;
	}

	public PrimitiveProjector(int width, int height, double zoom) {
		super();
		this.width = width;
		this.height = height;
		this.zoom = zoom;
	}

}
